package com.yxy.springcloudtest.personinfo.controller;

import com.yxy.springcloudtest.personinfo.bean.Person;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * 测试用的controller
 */
@RestController
public class TestController {

    /**
     * @return
     */
    @GetMapping("/findAllPerson")
    public List<Person> findAllPerson() {
        List<Person> personList = new ArrayList<>();
        Person person1 = new Person("yxy1", "man");
        Person person2 = new Person("yxy2", "man");
        Person person3 = new Person("yxy3", "man");
        personList.add(person1);
        personList.add(person2);
        personList.add(person3);
        return personList;
    }
}
